#include <stdio.h>


extern short* diagonal (short*, short);

int main(){
	
	short n = 3;
	short sMatriz[n][n];// = {{1,2,3},{4,5,6},{7,8,9}};
	short i = 0;
	short j = 0;
	short k =0;
	for(i=0; i<n ; i++){
		for(j=0; j<n ; j++){
			sMatriz[i][j] = k;
			k++;
		}
	}

	i = 0;
	for(i ; i<n ; i++){
		for(j=0 ; j<n ; j++){
			printf("%i - ",sMatriz[i][j]);
		}
		printf("\n");
	}


	short* vector = diagonal(*sMatriz, n);

	for(i=0; i<n; i++)
	{
		printf("%i\n",vector[i]);
	}
	return 0;
}
